<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:170px;">
				<label style="width:50px;">关键字：</label>
				<input type="text" name="keywords" value="{$keywords}" style="width:80px;"/>
			</li>
			<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" {if $wherefields=='all'}selected="selected"{/if}>全部</option>
				<option value="user_id" {if $wherefields=='user_id'}selected="selected"{/if}>会员ID</option>
				<option value="company" {if $wherefields=='company'}selected="selected"{/if}>商家名称</option>
				<option value="agent_id" {if $wherefields=='agent_id'}selected="selected"{/if}>分销商ID</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,user_id,mobile,tel,realname,company" />
			</li>
			<!--<li style="width:150px;">
                <label style="width:60px;">商户类型：</label>
                <select name="stype" class="combox"> 
                    <option value="all" {if $stype=='all'||empty($stype)}selected="selected"{/if}>全部</option>
                    <option value="1" {if $stype=='1'}selected="selected"{/if}>省专营商</option>
                    <option value="2" {if $stype=='2'}selected="selected"{/if}>市专营商</option>
                    <option value="3" {if $stype=='3'}selected="selected"{/if}>区专营商</option>
                    <option value="4" {if $stype=='4'}selected="selected"{/if}>代理商</option>
                </select>
            </li>
			-->
            <li style="width:380px;">
                <label style="width:60px;">商户区域：</label>
                <select name="vesting_province"   ref="city_index" refUrl="{:U('Areauser/area')}&id={value}&level=2" class="combox">
                    <option value="all">请选择省份...</option>
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == 0}
                        <option value="{$vo['id']}" {if $province==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                  </select>
                  <select name="vesting_city" ref="area_index" refUrl="{:U('Areauser/area')}&id={value}&level=3" id="city_index" class="combox">
                    <option value="all">请选择城市...</option>
                    {if !empty($vesting_city)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $province}
                        <option value="{$vo['id']}" {if $city==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
                  <select name="vesting_area" id="area_index" class="combox">
                    <option value="all">请选择区域...</option>
                    {if !empty($vesting_area)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $city}
                        <option value="{$vo['id']}" {if $area==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
            </li>
			<li style="width:180px;">
			<label style="width:60px;">审核状态：</label>	
			 <select name="status" class="combox">
                    <option value="all" {if $status=='all'||empty($status)}selected="selected"{/if}>请选择...</option>
                    <option value="0" {if $status=='0'}selected="selected"{/if}>未审核</option>
                    <option value="1" {if $status=='1'}selected="selected"{/if}>审核未通过</option>
					<option value="2" {if $status=='2'}selected="selected"{/if}>审核通过</option>
			</select>
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		</ul>
	</div>
	<div id="user_list">
	<table class="table" layoutH="110">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="60" orderField="user_id" {if $orderField=='user_id'}class="{$orderDirection}"{/if}>帐户ID</th>
				<th width="260" orderField="realname" {if $orderField=='realname'}class="{$orderDirection}"{/if}>商家名称(联系人)</th>	
				<th width="330" orderField="vesting_province" {if $orderField=='vesting_province'}class="{$orderDirection}"{/if}>地址</th>
				<th width="240" orderField="realname" {if $orderField=='realname'}class="{$orderDirection}"{/if}>会员归属</th>
				<th width="180" orderField="mobile" {if $orderField=='mobile'}class="{$orderDirection}"{/if}>电话/手机</th>
				<th width="180" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>时间</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>用户名</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>CV</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>BV</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>PV</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>MV</th>
				<th width="150" orderField="starttime" {if $orderField=='starttime'}class="{$orderDirection}"{/if}>邮箱</th>
				<!--<th width="240">审核状态</th>-->
				<th width="240">用户状态</th>
				<th width="120">编辑</th>
			</tr>
		</thead>
		<tbody>
		<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['userid']}</td>
				<td>{if empty($vo[company])}{$vo[realname]}{else}{$vo[company]}({$vo[realname]}){/if}</td>
				<td>{$vo['address']}</a></td>
				<td>
					{$Area[$vo[province]]['name']}
                        {if $vo[city]!=0}|{$Area[$vo[city]]['name']}{/if}
                        {if $vo[area]!=0}|{$Area[$vo[area]]['name']}{/if}
				</td>
				<td>{if empty($vo[tel])}{$vo[mobile]}{else}{$vo[tel]}({$vo[mobile]}){/if}</td>
				<td>{$vo[createtime] ? $vo[createtime]|date='Y-m-d H:m:s',###:''}</td>
					<td>{$vo['username']}</td>
					<td>{if empty($vo['cvvalue'])}0{else}{$vo[cvvalue]/100}{/if}</td>
					<td>{if empty($vo['bvvalue'])}0{else}{$vo[bvvalue]/100}{/if}</td>
					<td>{if empty($vo['pvvalue'])}0{else}{$vo[pvvalue]/100}{/if}</td>
					<td>{if empty($vo['mvvalue'])}0{else}{$vo[mvvalue]/100}{/if}</td>
					<td>{$vo['email']}</td>
				<!--<td>{$agent_pay_status[$vo[pay_status]]}|{$agent_status[$vo[status]]}|{$agent_isclose[$vo[isclose]]}</td>-->
				<td>{if $vo['status']==0}未审核{/if}{if $vo['status']==1}审核未通过{/if}{if $vo['status'] ==2}审核通过{/if}</td>
				<td><a title="编辑" target="dialog" width="580" height="350"  href="{:U('Areauser/edit',array('id'=>$vo['user_id']))}" class="btnEdit">编辑</a> 
				<!--<a title="分销商关联区域会员编辑" target="dialog" width="580" height="350"  href="{:U('Areauser/sel_user',array('id'=>$vo['user_id']))}" class="btnEdit">分销商关联区域会员编辑</a>-->
				<!--<a title="查看" target="dialog"	
				width="830" height="380" rel="Agent_detail_{$vo['id']}" href="{:U('Areauser/detail',array('id'=>$vo['id']))}" class="btnInfo">查看</a>-->
				</td>
			</tr>
		</volist>
		</tbody>
	</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="66" {if $numPerPage==66}selected="selected"{/if}>66</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
